package Task2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-05-12
 * Time:13:30
 */
public class SalesEmployee extends ColaEmployee{
    public double sale;
    public double commission;

    public SalesEmployee(String name, int birthday, double sale, double commission) {
        super(name, birthday);
        this.sale = sale;
        this.commission = commission;
    }

    @Override
    public double getSalary(int month) {
        if(month==super.birthday){
            return (this.sale*this.commission)+100;
        }else{
            return (this.sale*this.commission);
        }
    }
}
